package com.lmonkey.servlet.cate;

import com.lmonkey.servic.CATAGORYDao;
import com.lmonkey.shop.CATEGORY;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;

@WebServlet("/admin/admin_cateselect")
public class CateSelect extends HttpServlet {
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        ArrayList<CATEGORY> catelist = CATAGORYDao.selectAll();

        request.setAttribute("catelist",catelist);

        request.getRequestDispatcher("admin_cate.jsp").forward(request,response);
    }
}
